//
//  GTCommit.swift
//  GitOSC-Swift
//
//  Created by 李萍 on 16/3/10.
//  Copyright © 2016年 李萍. All rights reserved.
//

import UIKit
import SwiftyJSON

class GTCommit: NSObject {
    var commitId: String!
    var shortId: String!
    var title: String!
    
    var author: GTUser!
    var authorEmail: String!
    var authorName: String!
    var createdAt: String!
    
    init(json: JSON) {
        commitId = json["id"].stringValue
        shortId = json["short_id"].stringValue
        title = json["title"].stringValue
        
        author = GTUser.init(json: json["author"])
        authorEmail = json["author_email"].stringValue
        authorName = json["author_name"].stringValue
        createdAt = json["created_at"].stringValue
    }
}
